package com.yzl.meeting.framework.beans.support;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class DefaultSingletonBeanRegistry implements SingletonBeanRegistry {
    //存放单例bean的集合
    private Map<String, Object> beanMap = new ConcurrentHashMap<>();

    @Override
    public Object getSingleton(String beanId) {
       return beanMap.get(beanId);
    }

    @Override
    public void registerSinleton(String beanId, Object bean) {
        beanMap.put(beanId, bean);
    }
}
